package com.heima.heima_netty.nio.c4;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @author felixSocketChannel
 * @date 2024/9/10 15:42
 */
public class MultiThreadClient {
    public static void main(String[] args) throws IOException {
        SocketChannel sc = SocketChannel.open();
        sc.connect(new InetSocketAddress("localhost",8089));
        sc.write(Charset.defaultCharset().encode("0123456789abcdef"));
        System.in.read();//等待键盘输入
    }
}
